<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>程序员必备的代码审查（Code Review）清单_PHP程序员博客|高蒙个人博客</title>
    <meta name="Keywords" content=""/>
    <meta name="Description" content="在我们关于高效代码审查的博文中，我们建议使用一个检查清单。在代码审查中，检查清单是一个非常好的工具——它们保证了审查可以在你的团队中始终如一的进行。它们也是一种保证常见问题能够被发现并被解决的便利方式。软件工程学院的研究表明，程序员们会犯15-20种常见的错误。所以，通过把这些错误加入到检查清单当中，你可以确保不论什么时候，只要这些错误发生了，你就能发现它们，并且可以帮助你杜绝这些错误。为了帮助你开始创建一个清单，这里列出了一些典型的内容：代码审查清单常规项代码能够工作么？它有没有实现预期的功能，逻辑是否"/>
    <meta property="qc:admins" content="172533702763053056701166375"/>
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/font-awesome.min.css">
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="./css/atelier-seaside-light.css">
</head>
<body class="body_bg"><!--head begin-->
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="navbar navbar-inverse navbar-fixed-top">
                <div class="container">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
                    </div>
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                            <li class="active"><a href="/index.html">首页</a></li>
                            <li class="dropdown"><a href="/Article/cate/id/1.html" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">PHP笔记<span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li><a href="/Article/cate/id/1.html">PHP笔记</a></li>
                                    <li><a href="/Article/cate/id/2.html">PHP框架</a></li>
                                    <li><a href="/Article/cate/id/5.html">|--CodeIgniter</a></li>
                                    <li><a href="/Article/cate/id/6.html">|--zend framework</a></li>
                                    <li><a href="/Article/cate/id/7.html">|--Yii2</a></li>
                                    <li><a href="/Article/cate/id/8.html">|--Thinkphp</a></li>
                                    <li><a href="/Article/cate/id/3.html">CMS系统</a></li>
                                    <li><a href="/Article/cate/id/9.html">|--DedeCMS</a></li>
                                    <li><a href="/Article/cate/id/10.html">|--EmpireCMS</a></li>
                                    <li><a href="/Article/cate/id/11.html">|--EcshopCMS</a></li>
                                    <li><a href="/Article/cate/id/12.html">|--DestoonCMS</a></li>
                                    <li><a href="/Article/cate/id/13.html">|--DiscuzCMS</a></li>
                                    <li><a href="/Article/cate/id/4.html">PHP技术</a></li>
                                    <li><a href="/Article/cate/id/17.html">|--Redis</a></li>
                                    <li><a href="/Article/cate/id/18.html">|--Memcached</a></li>
                                    <li><a href="/Article/cate/id/22.html">|--PHP</a></li>
                                    <li><a href="/Article/cate/id/19.html">PHP工具</a></li>
                                    <li><a href="/Article/cate/id/20.html">|--Phpstorm</a></li>
                                    <li><a href="/Article/cate/id/21.html">数据采集</a></li>
                                    <li><a href="/Article/cate/id/30.html">|--火车头采集器</a></li>
                                    <li><a href="/Article/cate/id/26.html">其他知识</a></li>
                                </ul>
                            </li>
                            <li class="dropdown"><a href="/Article/cate/id/14.html" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">前端技术<span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li><a href="/Article/cate/id/14.html">前端技术</a></li>
                                    <li><a href="/Article/cate/id/15.html">jQuery/js</a></li>
                                    <li><a href="/Article/cate/id/16.html">Html/Css</a></li>
                                    <li><a href="/Article/cate/id/29.html">Bootstrap</a></li>
                                </ul>
                            </li>
                            <li class="dropdown"><a href="/Article/cate/id/23.html" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">服务器<span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li><a href="/Article/cate/id/23.html">服务器</a></li>
                                    <li><a href="/Article/cate/id/24.html">Linux</a></li>
                                    <li><a href="/Article/cate/id/25.html">Nginx</a></li>
                                </ul>
                            </li>
                            <li class="dropdown"><a href="/Article/cate/id/27.html" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">数据库<span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li><a href="/Article/cate/id/27.html">数据库</a></li>
                                    <li><a href="/Article/cate/id/28.html">Mysql</a></li>
                                    <li><a href="/Article/cate/id/35.html">SQL SERVER</a></li>
                                </ul>
                            </li>
                            <li class="dropdown"><a href="/Article/cate/id/32.html" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">闲言碎语<span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li><a href="/Article/cate/id/32.html">闲言碎语</a></li>
                                </ul>
                            </li>
                            <li class="dropdown"><a href="/Jquery.html" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">工具手册<span class="caret"></span></a>
                                <ul class="dropdown-menu"><!--li style="display:none;"><a href="/Article/archives.html">文章归档</a></li-->
                                    <li><a href="/Jquery.html">JQuery在线手册</a></li>
                                    <li><a href="/Tools/index.html">在线工具</a></li>
                                </ul>
                            </li>
                            <li><a href="/Link/index.html">友情链接</a></li>
                            <li><a href="/Article/message.html">联系博主</a></li>
                            <li><a href="javascript:;" data-toggle="modal" data-target="#mylogin">登录·注册</a></li>
                        </ul>
                        <form class="navbar-form navbar-right index_form" role="search" action="/Article/soso.html" method="GET">
                            <div class="input-group ">
                                <div class="form-group"><input type="text" class="form-control input-sm index_keyword" name="keyword" placeholder="搜一搜 才知道..."></div>
                                <span class="input-group-btn"><button class="btn btn-default btn-sm index_soso" type="button">Go!</button></span></div>
                        </form>
                        <ul class="nav navbar-nav navbar-right"></ul><!--<ul class="navbar-form navbar-right"><button  target="_blank" class="btn btn-default btn-success" data-toggle="modal" data-target="#mylogin">登录·注册</button></ul>--></div>
                </div>
            </div>
        </div>
    </div>
</div><!--head end-->
<div class="container m-t-60 bg-fff p-t-10">
    <div class="row">
        <div class="col-md-8"><!--<h3>人生要是没有理想， 那跟一条咸鱼有什么分别。</h3><form action="/Article/soso.html" method="GET" class="index_form"><div class="input-group"><input type="text" class="form-control input-lg index_keyword" name="keyword" placeholder="搜一搜 才知道..."><span class="input-group-btn"><button class="btn btn-default btn-lg index_soso" type="button">Go!</button></span></div></form>-->
            <!--<p class="text-muted p-t-10 hidden-xs"><a data-type="8" data-tmpl="527x25" data-tmplid="224" data-style="2" data-border="0" biz-g_lgo="0" biz-g_hot_x="11" biz-g_hot_site="14" biz-g_hot_space="0" biz-g_hot_color="#000" href="#">文字链</a></p>-->
            <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"><!-- Indicators -->
                <ol class="carousel-indicators">
                    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li><!--<li data-target="#carousel-example-generic" data-slide-to="1"></li><li data-target="#carousel-example-generic" data-slide-to="2"></li>--></ol><!-- Wrapper for slides -->
                <div class="carousel-inner" role="listbox">
                    <div class="item active"><img src="./images/1.png" alt="..." class="img-responsive">
                        <div class="carousel-caption">
                            水墨印象，龙行天下
                        </div>
                    </div><!--<div class="item"><script type="text/javascript">
                            /*幻灯广告 创建于2016-10-06*/
                            var cpro_id = "u2780606";
                        </script><script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script><div class="carousel-caption"></div></div><div class="item"><img src="/Public/Static/images/3.png" alt="..."  class="img-responsive"><div class="carousel-caption">
                            123
                        </div></div>--></div><!-- Controls --><a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous</span></a><a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next</span></a></div>
        </div>
        <div class="col-md-4">
            <div class="tree">
                <div class="alert alert-success alert-dismissible" role="alert">
                    <div class="row">
                        <div class="col-md-4"><img src="./images/login.jpg" alt="高蒙个人博客" title="高蒙个人博客" class="img-circle img-responsive center-block"></div>
                        <div class="col-md-8">
                            <address style="margin-bottom: 0"><strong>高蒙</strong><br><strong>简介：</strong>男，92年，php程序员！<br><strong>电子邮箱：</strong><br><a href="mailto:#">936594075@qq.com</a><br></address><!--<strong>欢迎你，游客</strong>&nbsp;
                            <p>这家伙有点懒，还没写个性签名！</p><button class="btn btn-info" id="btn_login">我要登录</button>&nbsp;<button class="btn btn-warning" id="btn_regist">我要注册</button>
                            --></div>
                        <div class="col-md-12">
                            <blockquote style="font-size: 14px; padding: 4px 0px 4px 20px;"><p>人生要是没有理想， 那跟一条咸鱼有什么分别。</p>
                                <footer>来自 <cite title="Source Title">星爷</cite></footer>
                            </blockquote>
                            <hr style="margin-bottom: 2px"/>
                            <ul class="list-inline col-md-12">
                                <li class="text-center col-md-4"><h6 class="text-danger">636</h6><h5>文章总数</h5></li>
                                <li class="text-center col-md-4"><h6 class="text-danger">264959</h6><h5>访问人气</h5></li>
                                <li class="text-center col-md-4"><h6 class="text-danger">536天</h6><h5>建站天数</h5></li>
                            </ul><!--button class="btn btn-info" id="btn_login">我要登录</button>&nbsp;<button class="btn btn-warning" id="btn_regist">我要注册</button>&nbsp;<a href="" class="btn btn-danger">我要建站</a>
                            --></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container m-t-10">
    <div class="row">
        <div class="col-md-9 bg-fff p-t-10 b-r-s">
            <ol class="breadcrumb">
                <li><a href="/index.html">首页</a></li>
                <li><a href="/Article/cate/id/26.html">其他知识</a></li>
                <li class="active">程序员必备的代码审查（Code Review）清单</li>
            </ol><!--标题 begin--><h2><a href="/Article/info/id/239.html" class="text-primary">程序员必备的代码审查（Code Review）清单</a></h2><!---->
            <p class="text-muted">
                <small><span class="glyphicon glyphicon-th-list"></span>&nbsp;<a href="/Article/cate/id/26.html">其他知识</a>&nbsp;
                    <span class="glyphicon glyphicon-user"></span>&nbsp;高蒙&nbsp;
                    <span class="glyphicon glyphicon-eye-open"></span>&nbsp;阅读(580)&nbsp;
                    <!--<span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;&nbsp;--><!--<span class="glyphicon glyphicon-edit"></span>&nbsp;评论(36)&nbsp;--><span class="glyphicon glyphicon glyphicon-tags"></span>&nbsp;
                    <a href="/Article/soso/keyword/.html" class="text-muted"></a>&nbsp;
                    <span class="glyphicon glyphicon-time"></span>&nbsp;2016-08-27 14:07:58&nbsp;
                </small>
            </p>
            <hr/><!----><!--内容 begin-->
            <div class="content"><p>在我们关于高效代码审查的博文中，我们建议使用一个检查清单。在代码审查中，检查清单是一个非常好的工具——它们保证了审查可以在你的团队中始终如一的进行。它们也是一种保证常见问题能够被发现并被解决的便利方式。</p>
                <p>软件工程学院的研究表明，程序员们会犯15-20种常见的错误。所以，通过把这些错误加入到检查清单当中，你可以确保不论什么时候，只要这些错误发生了，你就能发现它们，并且可以帮助你杜绝这些错误。</p>
                <p>为了帮助你开始创建一个清单，这里列出了一些典型的内容：</p>
                <h3>代码审查清单</h3><h4>常规项</h4>
                <ul class=" list-paddingleft-2" style="list-style-type: disc;">
                    <li><p>代码能够工作么？它有没有实现预期的功能，逻辑是否正确等。</p></li>
                    <li><p>所有的代码是否简单易懂？</p></li>
                    <li><p>代码符合你所遵循的编程规范么？这通常包括大括号的位置，变量名和函数名，行的长度，缩进，格式和注释。</p></li>
                    <li><p>是否存在多余的或是重复的代码？</p></li>
                    <li><p>代码是否尽可能的模块化了？</p></li>
                    <li><p>是否有可以被替换的全局变量？</p></li>
                    <li><p>是否有被注释掉的代码？</p></li>
                    <li><p>循环是否设置了长度和正确的终止条件？</p></li>
                    <li><p>是否有可以被库函数替代的代码？</p></li>
                    <li><p>是否有可以删除的日志或调试代码？</p></li>
                </ul>
                <h4>安全</h4>
                <ul class=" list-paddingleft-2" style="list-style-type: disc;">
                    <li><p>所有的数据输入是否都进行了检查（检测正确的类型，长度，格式和范围）并且进行了编码？</p></li>
                    <li><p>在哪里使用了第三方工具，返回的错误是否被捕获？</p></li>
                    <li><p>输出的值是否进行了检查并且编码？</p></li>
                    <li><p>无效的参数值是否能够处理？</p></li>
                </ul>
                <h4>文档</h4>
                <ul class=" list-paddingleft-2" style="list-style-type: disc;">
                    <li><p>是否有注释，并且描述了代码的意图？</p></li>
                    <li><p>所有的函数都有注释吗？</p></li>
                    <li><p>对非常规行为和边界情况处理是否有描述？</p></li>
                    <li><p>第三方库的使用和函数是否有文档？</p></li>
                    <li><p>数据结构和计量单位是否进行了解释？</p></li>
                    <li><p>是否有未完成的代码？如果是的话，是不是应该移除，或者用合适的标记进行标记比如‘TODO’？</p></li>
                </ul>
                <h4>测试</h4>
                <ul class=" list-paddingleft-2" style="list-style-type: disc;">
                    <li><p>代码是否可以测试？比如，不要添加太多的或是隐藏的依赖关系，不能够初始化对象，测试框架可以使用方法等。</p></li>
                    <li><p>是否存在测试，它们是否可以被理解？比如，至少达到你满意的代码覆盖(code coverage)。</p></li>
                    <li><p>单元测试是否真正的测试了代码是否可以完成预期的功能？</p></li>
                    <li><p>是否检查了数组的“越界“错误？</p></li>
                    <li><p>是否有可以被已经存在的API所替代的测试代码？</p></li>
                </ul>
                <p>你同样需要把特定语言中有可能引起错误的问题添加到清单中。</p>
                <p><br/></p>
                <p>这个清单故意没有详尽的列出所有可能会发生的错误。你不希望你的清单是这样的，太长了以至于从来没人会去用它。仅仅包含常见的问题会比较好。</p><h4>优化你的清单</h4>
                <p>把使用清单作为你的起点，针对特定的使用案例，你需要对其进行优化。一个比较棒的方式就是让你的团队记录下那些在代码审查过程中临时发现的问题，有了这些数据，你就能够确定你的团队常犯的错误，然后你就可以量身定制一个审查清单。确保你删除了那些没有出现过的错误。（你也可以保留那些出现概率很小，但是非常关键的项目，比如安全相关的问题）。</p><h4>得到认可并且保持更新</h4>
                <p>基本规则是，清单上的任何条目都必须明确，而且，如果可能的话，对于一些条目你可以对其进行二元判定。这样可以防止判断的不一致。和你的团队分享这份清单并且让他们认同你清单的内容是个好主意。同样的，要定期检查你的清单，以确保各条目仍然是有意义的。</p>
                <p><br/></p>
                <p>有了一个好的清单，可以提高你在代码审查过程中发现的缺陷个数。这可以帮助你提高代码标准，避免质量参差不齐的代码审查。</p>
                <p><br/></p>
                <div class="alert alert-info" role="alert">如果您对上面的内容还有补充，请在文章下评论或者给我<a href="/Article/message.html" target="_blank" rel="nofollow"><u>[留言]</u></a>。谢谢！</div>
            </div><!--内容 end-->
            <hr/>
            <ul class="list-inline">
                <li>
                    上一篇：<a href="/Article/info/id/238.html" title="苹果Mac电脑怎么修改host文件">苹果Mac电脑怎么修改host文件</a></li>
                <li class="f-r">
                    下一篇：<a href="/Article/info/id/240.html" title="如何解决nginx服务器图片防盗链的问题和方法">如何解决nginx服务器图片防盗链的问题和方法</a></li>
            </ul>
            <hr/>
            <p><h4>相关文章</h4></p>
            <ul class="list-inline">
                <li class="col-md-6"><a href="/Article/info/id/653.html" title="电脑hosts为什么会出现windows10.microdone.cn">电脑hosts为什么会出现windows10.microdone.cn</a></li>
                <li class="col-md-6"><a href="/Article/info/id/652.html" title="嵌套iframe框架之间的跳转或刷新新页面">嵌套iframe框架之间的跳转或刷新新页面</a></li>
                <li class="col-md-6"><a href="/Article/info/id/651.html" title="简单好用，极易上手的图片截取截图插件cropper.js">简单好用，极易上手的图片截取截图插件cropper.js</a></li>
                <li class="col-md-6"><a href="/Article/info/id/650.html" title="如何解决javascript获取隐藏元素宽高的方法">如何解决javascript获取隐藏元素宽高的方法</a></li>
                <li class="col-md-6"><a href="/Article/info/id/649.html" title="以图搜图 我知图 相似图像搜索与推荐API服务 PHP接口类文档">以图搜图 我知图 相似图像搜索与推荐API服务 PHP接口类文档</a></li>
                <li class="col-md-6"><a href="/Article/info/id/648.html" title="如何用js判断图片地址是否正确">如何用js判断图片地址是否正确</a></li>
                <li class="col-md-6"><a href="/Article/info/id/647.html" title="360 火狐 谷歌浏览器设置代理服务器">360 火狐 谷歌浏览器设置代理服务器</a></li>
                <li class="col-md-6"><a href="/Article/info/id/646.html" title="整理常用thinkphp的模型操作方法">整理常用thinkphp的模型操作方法</a></li>
                <li class="col-md-6"><a href="/Article/info/id/645.html" title="php &amp;not禁止转义字符">php &amp;not禁止转义字符</a></li>
                <li class="col-md-6"><a href="/Article/info/id/644.html" title="如何使用thinkphp路由正则表达式优化地址链接">如何使用thinkphp路由正则表达式优化地址链接</a></li>
            </ul>
            <p style="clear: both"></p>
            <hr/>
            <div class="alert alert-success" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                作者：高蒙<br/>
                Q Q ：936594075 <a href="/Article/message.html" class="text-warning" target="_blank" rel="nofollow"><u>我要留言</u></a><br/>
                邮箱：936594075#qq.com(#替换成@) <br/>
                版权声明：除非本文有注明出处，否则转载请注明本文来自 <a href="http://www.shuchengxian.com/index.html" title="高蒙个人博客,高蒙博客,个人博客">高蒙个人博客</a><br/></div>
            <hr><!--我要评论 start--><p><h4>最新评论</h4></p>
            <div class="col-md-12" id="commentlist">
                <div class="media"><a class="media-left" href="javascript:;"><img class="media-object " src="./images/avatar01.jpg" data-holder-rendered="true" style="width: 50px; height: 50px;"></a>
                    <div class="media-body"><p class="media-heading"><b class="text-danger nickname11">PHP程序员雷雪松</b><span class="f-r">2016-12-22 10:15:48&nbsp;&nbsp;<a href="javascript:;" onclick="replyId(11);">回复</a></span></p>
                        看了这篇文章，收获很大！！！
                        <p class="ajaxreply11">
                            <div class="media"><a class="media-left" href="javascript:;"><img class="media-object" src="http://q.qlogo.cn/qqapp/101349259/3227886627B656F7C4A89DC251727B51/40" data-holder-rendered="true" style="width: 50px; height: 50px;"></a>
                                <div class="media-body">
                        <p class="media-heading"><b>admin</b>
                            <ins class="f-r">[2017-02-08 10:57:40]</ins>
                        </p>
                        你的博客挺好的。我也经常看哦。
                    </div>
                </div>
                </p></div>
        </div>
    </div>
    <p style="clear: both">
    <hr/>
    <h4>我要评论</h4></p>
    <div class="row">
        <div class="col-md-12">
            <form id="btn_link_textarea">
                <div class="form-group">
                    <div class="col-md-12"><p class="text-danger">站长昵称：(*)</p>
                        <div>
                            <div class="input-group m-b-10">
                                <div class="input-group-addon"><i class="fa fa-user"></i></div>
                                <input type="text" class="form-control" id="c_username" placeholder="1-20字符之间" value="" style="width: 100%;"></div>
                        </div>
                    </div>
                    <div class="col-md-12"><p>电子邮箱：</p>
                        <div>
                            <div class="input-group m-b-10">
                                <div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div>
                                <input type="text" class="form-control" id="c_email" placeholder="936594075@qq.com" value="" style="width: 100%;"></div>
                        </div>
                    </div>
                    <div class="col-md-12"><p>网站域名：</p>
                        <div>
                            <div class="input-group m-b-10">
                                <div class="input-group-addon"><i class="fa fa-internet-explorer"></i></div>
                                <input type="text" class="form-control" id="c_url" placeholder="www.shuchengxian.com" style="width: 100%;"></div>
                        </div>
                    </div>
                    <div class="col-md-12"><textarea class="form-control" rows="6" id="c_info" placeholder="来了，总得留点什么...切勿到此一游！最多255字符"></textarea></div>
                    <div class="col-md-6">
                        <button type="button" class="btn btn-success m-t-10" id="sub_comment">确定提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <hr/><!--展示评论 end-->
    <hr/>
</div>
<div class="col-md-3 bg-fff  hidden-xs hidden-sm "><h4>全部板块</h4>
    <div class="b-t-hx"></div>
    <ul class="p-l-10 list-style p-b-10 ol-b-k">
        <li><a href="/Article/cate/id/1.html">PHP笔记</a></li>
        <li><a href="/Article/cate/id/19.html">++&nbsp;PHP工具</a></li>
        <li><a href="/Article/cate/id/20.html">++++&nbsp;Phpstorm</a></li>
        <li><a href="/Article/cate/id/2.html">++&nbsp;PHP框架</a></li>
        <li><a href="/Article/cate/id/5.html">++++&nbsp;CodeIgniter</a></li>
        <li><a href="/Article/cate/id/6.html">++++&nbsp;zend framework</a></li>
        <li><a href="/Article/cate/id/7.html">++++&nbsp;Yii2</a></li>
        <li><a href="/Article/cate/id/8.html">++++&nbsp;Thinkphp</a></li>
        <li><a href="/Article/cate/id/21.html">++&nbsp;数据采集</a></li>
        <li><a href="/Article/cate/id/30.html">++++&nbsp;火车头采集器</a></li>
        <li><a href="/Article/cate/id/3.html">++&nbsp;CMS系统</a></li>
        <li><a href="/Article/cate/id/10.html">++++&nbsp;EmpireCMS</a></li>
        <li><a href="/Article/cate/id/11.html">++++&nbsp;EcshopCMS</a></li>
        <li><a href="/Article/cate/id/12.html">++++&nbsp;DestoonCMS</a></li>
        <li><a href="/Article/cate/id/13.html">++++&nbsp;DiscuzCMS</a></li>
        <li><a href="/Article/cate/id/9.html">++++&nbsp;DedeCMS</a></li>
        <li><a href="/Article/cate/id/4.html">++&nbsp;PHP技术</a></li>
        <li><a href="/Article/cate/id/17.html">++++&nbsp;Redis</a></li>
        <li><a href="/Article/cate/id/18.html">++++&nbsp;Memcached</a></li>
        <li><a href="/Article/cate/id/22.html">++++&nbsp;PHP</a></li>
        <li><a href="/Article/cate/id/26.html">++&nbsp;其他知识</a></li>
        <li><a href="/Article/cate/id/14.html">前端技术</a></li>
        <li><a href="/Article/cate/id/15.html">++&nbsp;jQuery/js</a></li>
        <li><a href="/Article/cate/id/16.html">++&nbsp;Html/Css</a></li>
        <li><a href="/Article/cate/id/29.html">++&nbsp;Bootstrap</a></li>
        <li><a href="/Article/cate/id/23.html">服务器</a></li>
        <li><a href="/Article/cate/id/24.html">++&nbsp;Linux</a></li>
        <li><a href="/Article/cate/id/25.html">++&nbsp;Nginx</a></li>
        <li><a href="/Article/cate/id/27.html">数据库</a></li>
        <li><a href="/Article/cate/id/28.html">++&nbsp;Mysql</a></li>
        <li><a href="/Article/cate/id/35.html">++&nbsp;SQL SERVER</a></li>
        <li><a href="/Article/cate/id/31.html">资源分享</a></li>
        <li><a href="/Article/cate/id/33.html">++&nbsp;PHP(OOP)编程入门</a></li>
        <li><a href="/Jquery.html">++&nbsp;jQuery手册</a></li>
        <li><a href="/Article/cate/id/37.html">++&nbsp;jQuery插件</a></li>
        <li><a href="/Article/cate/id/32.html">闲言碎语</a></li>
    </ul>
    <h4>热门文章</h4>
    <div class="b-t-hx"></div>
    <ul class="p-l-10">
        <li><a href="/Article/info/id/79.html" class="">phpstorm10.0.3破解版安装教程及汉化方法</a></li>
        <li><a href="/Article/info/id/71.html" class="">bootstrap响应式图片自适应图片大小</a></li>
        <li><a href="/Article/info/id/83.html" class="">如何让phpstorm同一窗口能打开多个项目目录</a></li>
        <li><a href="/Article/info/id/175.html" class="">实现echarts 饼图 点击链接跳转</a></li>
        <li><a href="/Article/info/id/229.html" class="">如何监听html5 audio音频是否播放完毕</a></li>
        <li><a href="/Article/info/id/227.html" class="">Android webView加载Html5页面，JS不能调用问题和click事件无效的解决方法</a></li>
        <li><a href="/Article/info/id/230.html" class="">ios加载html5 audio标签用js调用.play()方法无效</a></li>
        <li><a href="/Article/info/id/76.html" class="">yii2框架安装运行init.bat报错php.exe不是内部或外部命令</a></li>
        <li><a href="/Article/info/id/33.html" class="">火车头采集器帝国cms发布模块</a></li>
        <li><a href="/Article/info/id/73.html" class="">yii2框架安装教程(框架版本2.0)</a></li>
    </ul>
    <h4>最新文章</h4>
    <div class="b-t-hx"></div>
    <ul class="p-l-10">
        <li><a href="/Article/info/id/649.html" class="">以图搜图 我知图 相似图像搜索与推荐API服务 PHP接口类文档</a></li>
        <li><a href="/Article/info/id/648.html" class="">如何用js判断图片地址是否正确</a></li>
        <li><a href="/Article/info/id/647.html" class="">360 火狐 谷歌浏览器设置代理服务器</a></li>
        <li><a href="/Article/info/id/646.html" class="">整理常用thinkphp的模型操作方法</a></li>
        <li><a href="/Article/info/id/645.html" class="">php &amp;not禁止转义字符</a></li>
        <li><a href="/Article/info/id/644.html" class="">如何使用thinkphp路由正则表达式优化地址链接</a></li>
        <li><a href="/Article/info/id/643.html" class="">php使用dblib扩展,连接sqlserver中文乱码问题</a></li>
        <li><a href="/Article/info/id/642.html" class="">js实现鼠标移动放大图片功能</a></li>
        <li><a href="/Article/info/id/641.html" class="">解决jQuery ajax动态新增节点绑定多个事件无效的问题</a></li>
        <li><a href="/Article/info/id/640.html" class="">整理使用ajax开发搜索功能中遇到的问题以及解决的方法</a></li>
    </ul>
    <script type="text/javascript">
        /*方形广告 240*240 创建于 2016/10/6*/
        var cpro_id = "u2780622";
    </script>
    <script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/c.js"></script>
</div>
</div></div><!--弹窗回复none-->
<div id="showbox" class="none">
    <div class="col-md-12"><h4>回复：<span id="reply_nickname"></span></h4><input type="hidden" id="reply_id"><textarea class="form-control" rows="6" id="reply_info" placeholder=""></textarea>
        <button class="btn btn-success m-t-10" id="sub_reply">立即回复</button>
    </div>
</div>
<script src="./js/jquery.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/jquery.validate.min.js"></script>
<script src="./js/messages_zh.js"></script>
<script src="./js/layer.js"></script>
<script src="./js/core.js"></script>
<script src="./js/jquery.lazyload.min.js"></script>
<script src="./js/prettify.js"></script>
<script src="./js/layer.js"></script><!--footer begin-->
<div class="container m-t-10 bg-fff p-t-10">
    <div class="row">
        <div class="col-md-12"><p class="text-muted">Copyrights &copy; 2016-2017 <a href="http://www.shuchengxian.com" title="高蒙个人博客" 　target="_blank">高蒙个人博客</a>
            www.shuchengxian.com, All rights reserved. 皖ICP备15015490号
            <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=34152302000022" target="_blank">皖公网安备 34152302000022号</a><a href="http://www.shuchengxian.com/sitemap.xml" target="_blank">网站地图</a></p>
            <p class="text-muted">关键词：</p></div>
    </div>
</div><!--footer end--><!--login model begin-->
<div class="modal fade" id="mylogin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 50%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">登录·注册</h4></div>
            <div class="modal-body" style="overflow: hidden;">
                <div class="col-md-12">
                    <div class="col-md-6">
                        <form action="/Login/loginIn.html" method="post" style="border-right:1px #eee solid;" id="LoginIn">
                            <div class="form-group "><p>用户登录：</p>
                                <div>
                                    <div class="input-group">
                                        <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>
                                        <input type="text" name="username" class="form-control" id="username" placeholder="用户名" style="width: 80%;"></div>
                                </div>
                                <p class="p-t-10">登录密码：</p>
                                <div>
                                    <div class="input-group">
                                        <div class="input-group-addon"><span class="glyphicon glyphicon-tasks"></span></div>
                                        <input type="password" name="password" id="password" class="form-control" placeholder="密码" style="width: 80%;"></div>
                                </div>
                                <p class="p-t-10">快速登录：</p>
                                <div class="input-group"><a href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101349259&redirect_uri=http://www.shuchengxian.com/Login/QQAuth.html&scope=get_user_info" target="_blank"><img src="./images/Connect_logo_3.png"></a>&nbsp;
                                    <a href="https://api.weibo.com/oauth2/authorize?client_id=1489731477&redirect_uri=http://www.shuchengxian.com/Login/weiBoAuth.html&scope=users/show&state=shuchengxian.com" target="_blank"><img src="./images/weibo_logo_3.png"></a></div>
                                <p class="p-t-10"></p>
                                <div class="input-group">
                                    <button type="submit" class="btn btn-success">登录</button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-6">
                        <form action="/Login/regist.html" method="post" id="Login_regist">
                            <div class="form-group "><p>创建新账号：</p>
                                <div>
                                    <div class="input-group">
                                        <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>
                                        <input type="text" class="form-control" name="user" id="user" placeholder="字母、数字等 用户名唯一" style="width: 80%;"></div>
                                </div>
                                <p class="p-t-10">设置密码：</p>
                                <div>
                                    <div class="input-group">
                                        <div class="input-group-addon"><span class="glyphicon glyphicon-tasks"></span></div>
                                        <input type="password" class="form-control" name="pwd" id="pwd" placeholder="密码" style="width: 80%;"></div>
                                </div>
                                <p class="p-t-10">电子邮箱：</p>
                                <div>
                                    <div class="input-group">
                                        <div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div>
                                        <input type="text" class="form-control" name="email" id="email" placeholder="电子邮箱 认真填写,可找回密码！" style="width: 80%;"></div>
                                </div>
                                <div class="checkbox">
                                    <div class="col-md-8"><input type="checkbox" name="checkin" value="1" disabled checked>同意<a href="javascript:(0);">网站服务条款</a></div>
                                    <div class="col-md-4">
                                        <button type="submit" id="embed-submits" class="btn btn-success">注册</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button><!--<button type="button" class="btn btn-danger">忘记密码？</button><button type="button" class="btn btn-info" data-toggle="modal" data-target="#myregist">免费注册</button>--></div>
        </div>
    </div>
</div><!--login model end-->
<script>
    // 点击评论
    $('#sub_comment').click(function () {
        var nickname = $('#c_username').val(), url = $('#c_url').val(), email = $('#c_email').val(), info = $('#c_info').val(), id = 239;
        if (!id) {
            layer.msg('网络异常！');
            return false;
        }
        if (nickname.length < 1 || nickname.length > 20) {
            layer.msg('请正确填写站长昵称！');
            return false;
        }
        /*if (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(email) == false) {
         layer.msg('请正确填写邮箱地址！');return false;
         }
         if(email.length < 1){
         layer.msg('请正确填写邮箱地址！');return false;
         }*/
        if (info.length < 1) {
            layer.msg('兄弟，总得留点什么...切勿到此一游！');
            return false;
        }
        if (info.length > 255) {
            layer.msg('兄弟，你的文采太棒了，咱能简明概要吗！');
            return false;
        }
        $.ajax({
            url: "",
            data: {nickname: nickname, url: url, email: email, info: info, id: id},
            type: 'post',
            dataType: 'json',
        }).done(function (data) {
            if (data.status == 200) {
                layer.msg(data.msg);
            } else {
                layer.msg(data.msg);
            }
        }).fail(function () {
            layer.msg('网络异常');
        });
    });
    // 回复评论弹窗
    function replyId(id) {
        layer.open({
            type: 1,
            title: '回复评论',
            skin: 'layui-layer-rim', //加上边框
            area: ['600px', '280px'], //宽高
            content: $('#showbox')
        });
        $('#reply_id').val(id);
        $('#reply_nickname').text($('.nickname' + id).text());
    }
    // 回复评论
    $('#sub_reply').click(function () {
        var id = $('#reply_id').val(), info = $('#reply_info').val(), uid = 0;
        if (!uid) {
            layer.msg('请登录后回复评论！');
            return false;
        }
        if (!id) {
            layer.msg('参数错误！');
            return false;
        }
        if (!info || info.length < 1) {
            layer.msg('请回复点啥！');
            return false;
        }
        $.ajax({
            url: "",
            data: {id: id, info: info},
            type: 'post',
            dataType: 'json',
        }).done(function (data) {
            console.log(data);
            if (data.status == 200) {
                layer.msg(data.msg, {time: 2000}, function () {
                    layer.closeAll();
                });
            } else {
                layer.msg(data.msg);
            }
        }).fail(function () {
            layer.msg('网络异常');
        });

    });
</script>
<script type="text/javascript">
    /*内容页 创建于2016-10-06*/
    var cpro_id = "u2780609";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script><!--<script type="text/javascript">
        /*左右侧边栏 120*270 创建于 2016/10/6*/
        var cpro_id = "u2780613";
    </script><script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/f.js"></script>-->
<script type="text/javascript">
    /*图片上广告 自适应 创建于 2016/10/6*/
    var cpro_id = "u2780615";
</script>
<script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/i.js"></script>
<script type="text/javascript">
    /*自适应 创建于 2017/3/2*/
    var cpro_id = "u2908581";
</script>
<script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/i.js"></script>
</body>
</html>